/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kz.epam.homedevices.instrumentation;

import kz.epam.homedevices.ElectricalDevice;

/**
 *
 * @author Knoppix
 */
public class MeasuringDevice extends ElectricalDevice {

    private double value;
    private MeasuringType type;

    public MeasuringDevice() {
    }

    public MeasuringDevice(MeasuringType type, String maker, Double cardinality, boolean powerOn, double value) {
        super(maker, cardinality, powerOn);
        this.value = value;
        this.type = type;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public MeasuringType getType() {
        return type;
    }

    public void setType(MeasuringType type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "\n" + this.type.toString() + " {"
                + super.toString()
                + ", Current value: " + this.value + "}";
    }
}
